home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / cmsrc392.zip / ROMMS.MF < prev    next >
Text File  |  1992-03-30  |  10KB  |  242 lines

  1. % This file contains special characters of ``math italic'' fonts
  2. % that actually are not supposed to be slanted.
  3. % Codes \0050--\0057, \0072--\0077, and \0133--\0137 are generated.
  4.  
  5. % The italic corrections are zero in all of these characters.
  6.  
  7. cmchar "Leftward top half arrow";
  8. compute_spread(.45x_height#,.55x_height#);
  9. beginchar(oct"050",18u#,v_center(spread#+rule_thickness#));
  10. adjust_fit(0,0); pickup crisp.nib;
  11. pos1(rule_thickness,90); pos2(rule_thickness,90);
  12. pos3(rule_thickness,0); pos4(rule_thickness,0);
  13. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  14. y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0+4u+eps;
  15. pos5(rule_thickness,angle(z4-z0)); z5l=z0;
  16. pos6(rule_thickness,angle(z3-z0)); z6l=z0;
  17. numeric t; path p; p=z4r..{2(x0-x4),y0-y4}z6r;
  18. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  19. filldraw z0--(x0,y2l)---z1l..z1r---z2r
  20.  ..subpath (t,0) of\\(z3r..{2(x0-x3),y0-y3}z5r)
  21.  --z3l..{2(x0-x3),y0-y3}cycle;  % arrowhead and stem
  22. penlabels(0,1,2,3,4,5,6); endchar;
  23.  
  24. cmchar "Leftward bottom half arrow";
  25. compute_spread(.45x_height#,.55x_height#);
  26. beginchar(oct"051",18u#,v_center(spread#+rule_thickness#));
  27. adjust_fit(0,0); pickup crisp.nib;
  28. pos1(rule_thickness,90); pos2(rule_thickness,90);
  29. pos3(rule_thickness,0); pos4(rule_thickness,0);
  30. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  31. y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0+4u+eps;
  32. pos5(rule_thickness,angle(z4-z0)); z5l=z0;
  33. pos6(rule_thickness,angle(z3-z0)); z6l=z0;
  34. numeric t; path p; p=z4r..{2(x0-x4),y0-y4}z6r;
  35. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  36. filldraw z0{2(x4-x0),y4-y0}..z4l
  37.  --subpath (0,t) of\\(z4r..{2(x0-x4),y0-y4}z6r)
  38.  ..z2l---z1l..z1r---(x0,y2r)--cycle;  % arrowhead and stem
  39. penlabels(0,1,2,3,4,5,6); endchar;
  40.  
  41. cmchar "Rightward top half arrow";
  42. compute_spread(.45x_height#,.55x_height#);
  43. beginchar(oct"052",18u#,v_center(spread#+rule_thickness#));
  44. adjust_fit(0,0); pickup crisp.nib;
  45. pos1(rule_thickness,90); pos2(rule_thickness,90);
  46. pos3(rule_thickness,0); pos4(rule_thickness,0);
  47. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  48. y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0-4u-eps;
  49. pos5(rule_thickness,angle(z4-z0)); z5l=z0;
  50. pos6(rule_thickness,angle(z3-z0)); z6l=z0;
  51. numeric t; path p; p=z4l..{2(x0-x4),y0-y4}z6r;
  52. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  53. filldraw z0--(x0,y2l)---z1l..z1r---z2r
  54.  ..subpath (t,0) of\\(z3l..{2(x0-x3),y0-y3}z5r)
  55.  --z3r..{2(x0-x3),y0-y3}cycle;  % arrowhead and stem
  56. penlabels(0,1,2,3,4,5,6); endchar;
  57.  
  58. cmchar "Rightward bottom half arrow";
  59. compute_spread(.45x_height#,.55x_height#);
  60. beginchar(oct"053",18u#,v_center(spread#+rule_thickness#));
  61. adjust_fit(0,0); pickup crisp.nib;
  62. pos1(rule_thickness,90); pos2(rule_thickness,90);
  63. pos3(rule_thickness,0); pos4(rule_thickness,0);
  64. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  65. y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0-4u-eps;
  66. pos5(rule_thickness,angle(z4-z0)); z5l=z0;
  67. pos6(rule_thickness,angle(z3-z0)); z6l=z0;
  68. numeric t; path p; p=z4l..{2(x0-x4),y0-y4}z6r;
  69. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  70. filldraw z0{2(x4-x0),y4-y0}..z4r
  71.  --subpath (0,t) of\\(z4l..{2(x0-x4),y0-y4}z6r)
  72.  ..z2l---z1l..z1r---(x0,y2r)--cycle;  % arrowhead and stem
  73. penlabels(0,1,2,3,4,5,6); endchar;
  74.  
  75. cmchar "Left hook";
  76. compute_spread(.45x_height#,.55x_height#);
  77. beginchar(oct"054",5u#,v_center(2spread#+rule_thickness#));
  78. adjust_fit(0,0); pickup rule.nib; autorounded;
  79. lft x2=hround u-eps; x1=x3=w-x2;
  80. y1-y3=spread; y2=.5[y1,y3]; y3=math_axis;
  81. draw z1{left}...z2{down}...z3{right};  % hook
  82. labels(1,2,3); endchar;
  83.  
  84. cmchar "Right hook";
  85. compute_spread(.45x_height#,.55x_height#);
  86. beginchar(oct"055",5u#,v_center(2spread#+rule_thickness#));
  87. adjust_fit(0,0); pickup rule.nib; autorounded;
  88. rt x2=hround(w-u)+eps; x1=x3=w-x2;
  89. y1-y3=spread; y2=.5[y1,y3]; y3=math_axis;
  90. draw z1{right}...z2{down}...z3{left};  % hook
  91. labels(1,2,3); endchar;
  92.  
  93. cmchar "Triangle pointing right";
  94. beginchar(oct"056",9u#,v_center(x_height#));
  95. adjust_fit(0,0); pickup rule.nib;
  96. numeric a,b; a=sqrt(3.14159\\ /sqrt3); % triangle area $=$ circle area
  97. b=.5w-(rt hround u); .5[x1',x2']=.5w; x2'-x1'=a*b*sqrt3;
  98. x1=x3=good.x x1'; x2=good.x x2';
  99. y2=.5[y1,y3]=math_axis; y1=good.y(y2+a*b);
  100. draw z1--z2--z3--cycle;  % triangle
  101. labels(1,2,3); endchar;
  102.  
  103. cmchar "Triangle pointing left";
  104. beginchar(oct"057",9u#,v_center(x_height#));
  105. adjust_fit(0,0); pickup rule.nib;
  106. numeric a,b; a=sqrt(3.14159\\ /sqrt3); % triangle area $=$ circle area
  107. b=.5w-(rt hround u); .5[x1',x2']=.5w; x1'-x2'=a*b*sqrt3;
  108. x1=x3=good.x x1'; x2=good.x x2';
  109. y2=.5[y1,y3]=math_axis; y1=good.y(y2+a*b);
  110. draw z1--z2--z3--cycle;  % triangle
  111. labels(1,2,3); endchar;
  112.  
  113. cmchar "Period";
  114. numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
  115. define_whole_blacker_pixels(dot_diam);
  116. beginchar(oct"072",5u#,dot_diam#,0);  % non-ASCII position
  117. adjust_fit(0,0); pickup fine.nib;
  118. pos1(dot_diam,0); pos2(dot_diam,90);
  119. lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2);  % dot
  120. penlabels(1,2); endchar;
  121.  
  122. cmchar "Comma";
  123. numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
  124. define_whole_blacker_pixels(dot_diam);
  125. beginchar(oct"073",5u#,dot_diam#,comma_depth#);  % non-ASCII position
  126. adjust_fit(0,0);
  127. x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0;
  128. comma(1,a,dot_diam,.2u,comma_depth);  % dot and tail
  129. penlabels(1); endchar;
  130.  
  131. cmchar "Less than sign";
  132. compute_spread(5/4x_height#,3/2x_height#);
  133. beginchar("<",14u#,v_center(spread#+rule_thickness#));
  134. italcorr h#*slant-u#;
  135. adjust_fit(0,0); pickup rule.nib;
  136. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  137. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  138. draw z1--z2--z3;  % diagonals
  139. labels(1,2,3); endchar;
  140.  
  141. cmchar "Virgule (slash)";
  142. beginchar(oct"075",9u#,body_height#,paren_depth#);  % non-ASCII position
  143. italcorr body_height#*slant-.5u#;
  144. adjust_fit(0,0); pickup rule.nib;
  145. rt x1=hround(w-u)+eps; top y1=h+eps;
  146. lft x2=hround u-eps; bot y2=-d-eps;
  147. draw z1--z2;  % diagonal
  148. penlabels(1,2); endchar;
  149.  
  150. cmchar "Greater than sign";
  151. compute_spread(5/4x_height#,3/2x_height#);
  152. beginchar(">",14u#,v_center(spread#+rule_thickness#));
  153. italcorr math_axis#*slant-u#;
  154. adjust_fit(0,0); pickup rule.nib;
  155. rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
  156. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  157. draw z1--z2--z3;  % diagonals
  158. labels(1,2,3); endchar;
  159.  
  160. cmchar "Five-pointed star";
  161. beginchar(oct"077",9u#,v_center(x_height#));
  162. adjust_fit(0,0); pickup tiny.nib;
  163. numeric theta; theta=360/5; % degrees between points
  164. pos0(curve,0); pos1(rule_thickness,90); x0=x1=good.x .5w;
  165. top y1r=vround(math_axis+.5x_height+.5rule_thickness);
  166. ypart(.5[z1,z0+(z1-z2) rotated 2theta])=math_axis;
  167. pos2(curve,theta); pos3(rule_thickness,90+theta);
  168. z2=z0; z3-z0=(z1-z0) rotated theta;
  169. z4=whatever[z0l,z1r]=whatever[z2r,z3r];
  170. filldraw for n=0 upto 4:
  171.  z0+(z1r-z0)rotated(n*theta)--z0+(z4-z0)rotated(n*theta)--endfor
  172.  cycle;  % star
  173. penlabels(0,1,2,3,4); endchar;
  174.  
  175. cmchar "Musical flat sign";
  176. beginchar(oct"133",7u#,body_height#,0);
  177. adjust_fit(0,0); pickup crisp.nib;
  178. numeric light_hair; light_hair=if hefty: vair else: hair fi;
  179. pos1(light_hair,0); pos2(light_hair,180); pos3(light_hair,0); x1=x2=x3;
  180. pos4(.25[light_hair,curve],60); pos5(curve,0);
  181. lft x1l=hround u; x4=.5w; rt x5r=hround(w-u);
  182. top y1=h; bot y3=-o; top y4=x_height+o;
  183. y2=y4-.2x_height; y5=3/4x_height;
  184. filldraw stroke z1e--z3e;  % stem
  185. filldraw stroke z2e{up}...z4e{right}...z5e{down}
  186.  ...{2(x3-x5e),y3-y5e}z3e;  % bowl
  187. penlabels(1,2,3,4,5); endchar;
  188.  
  189. cmchar "Musical natural sign";
  190. beginchar(oct"134",7u#,asc_height#,desc_depth#);
  191. adjust_fit(0,0); pickup crisp.nib;
  192. numeric light_hair; light_hair=if hefty: vair else: hair fi;
  193. pos1(light_hair,0); pos2(curve,90); pos3(curve,90);
  194. pos4(curve,90); pos5(curve,90); pos6(light_hair,0);
  195. rt x1r=hround 15/8u; x2=x4=x1l; x3=x5=x6r=w-x2;
  196. y1=h+o; top y2r=0; .5[y2,y3]=0; y4-y2=y5-y3=x_height; bot y6=-d-o;
  197. x2'=x1r; z2'=whatever[z2r,z3r]; x5'=x6l; z5'=whatever[z4l,z5l];
  198. (x1r,y)=z1l+whatever*(z5-z4); y6l:=y6l-(y-y1r); y1r:=y;
  199. filldraw z1l--z2l--z3l--z3r--z2'--z1r--cycle;  % left stem and lower bar
  200. filldraw z6r--z5r--z4r--z4l--z5'--z6l--cycle;  % right stem and upper bar
  201. penlabels(1,2,3,4,5,6); endchar;
  202.  
  203. cmchar "Musical sharp sign";
  204. beginchar(oct"